/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1667890891047_5032';

  // add your middleware config here
  // {app_root}/config/config.default.js
  config.middleware = ['auth'];
  config.auth = {
    ignore: [ '/login'] // 忽略注册和登陆的接口
  };

  config.security = {
    csrf: {
      enable: false,
    },
  };
  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  config.sequelize = {
    dialect: 'mysql', // support: mysql, mariadb, postgres, mssql
    database: 'blog',
    host: 'localhost',
    port: 3306,
    username:'root',
    password:'123456'
  };
  // config/config.default.js
config.validate = {
  convert: true,
  // validateRoot: false,
};
  config.jwt = {
    secret: "123456"
  };
  config.multipart  = {

  };
  return {
    ...config,
    ...userConfig,
  };
};
